home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-01-05 | 2.4 KB | 53 lines | [TEXT/GEOL] |
- Item 5581931 3-Jan-90 17:00
-
- From: V0230 Trace, Laurence Kirsh,VAR
-
- To: MOOF Rollin, Keith A
- MACAPP.TECH$ MacApp Technical
-
- Sub: TTEView in TDialogView
-
- Keith, et al.
-
- First, "TTextEdit" is a misnomer for "TEditText", correct? Assuming this...
-
- I, too, have been trying to build a dialog with both a TEditText object and a
- TTEView object. It didn't seem as easy as just putting a TTEView into a
- TDialogView.
-
- My, er, view of the TEditText "problem" is that it works exactly as it should.
- The object models the single line text edit control found in dialogs, and such
- a control is one line tall and does not wrap the text. So leave it alone.
-
- What is needed is a separate TTEView for dialogs. This is problematic because
- TTEView is not a sub-class of TControl, and can't be. I suppose someone will
- suggest the need for multiple inheritance, but I think the solution used by
- TEditText (reference a sub-class of TTEView from a TControl) is a well
- structured one. It would appear that we just need to create a new TControl
- sub-class which references a TTEView object; but here comes a new problem:
- TDialogView gives special treatment to TEditText objects. It saves a single
- TDialogTEView and assigns it to the TEditText currently in use. But there is no
- easy way to extend this to other controls (say I want multiple TTEView controls
- in my dialog).
-
- I think this special relationship between TDialogView and TEditText needlessly
- complicates additions to the TControl class, and thus to dialogs. I suggest
- (perhaps for the 1995 release of MacApp!) that TDialogView's fTEView be
- replaced by a list of views called fSharedViews. The _contents_ of this list
- would be managed not by TDialogView, but by the various controls which might
- need to share object instances (as TEditText does now).
-
- For example, when a TEditText is created it would check for a TDialogTEView in
- the list, if none were there, it would create one. When the TEditText was
- selected by the user, the dialog would tell it, and the TEditText would then
- take care of gettting hold of the TDialogTEView from the list.
-
- Getting back to your proposed solution, if I just put a TTEView into a
- TDialogView, don't I loose all of the behaviour contributed by TControl? (Or is
- tabbing the only thing I'd miss?) I expected that I'd have to sub-class
- TControl.
-
- Thanks,
- --John MacVeigh
-
-